package com.blog.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * Copyright (C), 2022
 * Author: 苏大大
 * Date: 2022-06-09 17:03
 * FileName: Favorite
 * Description:用户收藏博客
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)    //开启链式写法
public class Favorite implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 博客id
     */
    private Long blogId;

    /**
     * 创建时间
     */
    @TableField("`create_time`")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime createTime;

    /**
     * 用户id
     */
    private Long uid;
}
